package cn.liyao.web.repository;

import cn.liyao.web.model.Messages;
import cn.liyao.web.model.OfflineMessages;
import org.springframework.data.jpa.repository.JpaRepository;

import java.util.List;

public interface OfflineMessageRepository extends JpaRepository<OfflineMessages, String> {


    List<OfflineMessages> findAllByToAndType(String receiveId,Integer type);

    void deleteAllByToAndTypeu(String userId, Integer typeu);

    void deleteAllByFrom(String fromId);

    void deleteAllByFromAndTo(String sender, String to);


}